package com.huluobo.a2204monthdemo.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.huluobo.a2204monthdemo.R
import com.huluobo.a2204monthdemo.utils.ImageUtils
import com.huluobo.base.bean.CommentBean

/**
 *  Created by LC on 2024/8/10.
 */
class CommentAdapter(list: MutableList<CommentBean>) :
    BaseQuickAdapter<CommentBean, BaseViewHolder>(R.layout.item_comment, list) {
    override fun convert(helper: BaseViewHolder, item: CommentBean) {
        ImageUtils.loadImage(context, item.icon, helper.getView(R.id.item_comment_icon_iv))
        helper.setText(R.id.item_comment_name_tv, item.username)
        helper.setText(R.id.item_comment_msg_tv, item.msg)
        helper.setText(R.id.item_comment_time_tv, item.createtime)
    }
}